#include<func.h>
int main (int argc,char * argv[])
{
   ARGS_CHECK(argc,3);
   int fdw = open(argv[1],O_WRONLY);
   int fdr = open(argv[2],O_RDONLY);
   printf("I am chat 2\n");
   char buf [128] = {0};
   while(1)
   {memset(buf,0,sizeof(buf));
     read(STDIN_FILENO,buf,sizeof(buf));
   write(fdw,buf,strlen(buf)-1);   
  
   memset(buf,0,sizeof(buf));
   read(fdr,buf,sizeof(buf));
    printf("buf = %s\n",buf); 
   
   
   }
   return 0;
}